package com.wuzheng.wisgo.sanitation.cloud.service.plan;

import com.wuzheng.wisgo.sanitation.cloud.model.plan.param.JobPlanDetailParam;
import com.wuzheng.wisgo.sanitation.cloud.model.plan.param.JobPlanSaveParam;
import com.wuzheng.wisgo.sanitation.cloud.model.plan.param.JobPlanListParam;
import com.wuzheng.wisgo.sanitation.cloud.model.plan.pojo.JobPlanDTO;
import com.wuzheng.wisgo.sanitation.cloud.model.plan.pojo.JobPlanDetailDTO;
import com.wuzheng.wisgo.sanitation.cloud.model.plan.pojo.JobPlanDetailRouteDTO;
import com.wuzheng.wisgo.sanitation.cloud.repository.entity.person.User;
import com.wuzheng.wisgo.sanitation.cloud.repository.entity.plan.JobPlan;
import com.wuzheng.wisgo.sanitation.framework.base.service.BaseService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @author：hoipang
 * @date：Created in 2019-12-18
 * @description：道路作业计划服务类
 * @modified By：
 * @version: 1.0
 */
@Transactional
@Service
public interface JobPlanService extends BaseService<JobPlan> {

    /**
     * 获取道路作业计划列表（支持分页）
     * @param jobPlanListParam
     * @return
     */
    List<JobPlanDTO> listJobPlanDTOs(JobPlanListParam jobPlanListParam);

    /**
     * 根据作业类型查询作业计划详情中的线路
     * @param jobTypeCode 作业类型
     * @return
     */
    List<JobPlanDetailRouteDTO> listDetailRouteDTOs(String jobTypeCode);

    /**
     * 删除作业计划(支持批量)
     *
     * @param list
     */
    void removeJobPlans(List<String> list);

    /**
     * 查询作业计划详情
     * @param jobPlanDetailParam
     * @return
     */
    JobPlanDetailDTO selectJobPlanDetailDTO(JobPlanDetailParam jobPlanDetailParam);

    String insertOrUpdate(User user, JobPlanSaveParam jobPlanSaveParam);
}
